package logic

import (
	"context"
	"merchantmanager/models/mysql"

	"merchantmanager/merchantrpc/internal/svc"
	"merchantmanager/merchantrpc/merchantrpc"

	"github.com/zeromicro/go-zero/core/logx"
)

type MerchantShowLogic struct {
	ctx    context.Context
	svcCtx *svc.ServiceContext
	logx.Logger
}

func NewMerchantShowLogic(ctx context.Context, svcCtx *svc.ServiceContext) *MerchantShowLogic {
	return &MerchantShowLogic{
		ctx:    ctx,
		svcCtx: svcCtx,
		Logger: logx.WithContext(ctx),
	}
}

func (l *MerchantShowLogic) MerchantShow(in *merchantrpc.MerchantShowRequest) (*merchantrpc.MerchantShowResponse, error) {
	// todo: add your logic here and delete this line
	mer := mysql.Mer{
		Name: in.Name,
		Stu:  in.Stu,
	}
	mysql.DB.Debug().Find(&mer)
	return &merchantrpc.MerchantShowResponse{}, nil
}
